package com.ruoyi.dangerControl.service.impl;

import java.util.List;

import com.ruoyi.dangerControl.vo.HdInspectionStandardVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dangerControl.mapper.HdInspectionStandardMapper;
import com.ruoyi.dangerControl.domain.HdInspectionStandard;
import com.ruoyi.dangerControl.service.IHdInspectionStandardService;

/**
 * 检查标准Service业务层处理
 *
 * @author lth
 * @date 2023-12-13
 */
@Service
public class HdInspectionStandardServiceImpl implements IHdInspectionStandardService
{
    @Autowired
    private HdInspectionStandardMapper hdInspectionStandardMapper;

    /**
     * 查询检查标准
     *
     * @param id 检查标准主键
     * @return 检查标准
     */
    @Override
    public HdInspectionStandard selectHdInspectionStandardById(Long id)
    {
        return hdInspectionStandardMapper.selectHdInspectionStandardById(id);
    }

    /**
     * 查询检查标准列表
     *
     * @param hdInspectionStandard 检查标准
     * @return 检查标准
     */
    @Override
    public List<HdInspectionStandard> selectHdInspectionStandardList(HdInspectionStandard hdInspectionStandard)
    {
        return hdInspectionStandardMapper.selectHdInspectionStandardList(hdInspectionStandard);
    }

    /**
     * 新增检查标准
     *
     * @param hdInspectionStandard 检查标准
     * @return 结果
     */
    @Override
    public int insertHdInspectionStandard(HdInspectionStandard hdInspectionStandard)
    {
        return hdInspectionStandardMapper.insertHdInspectionStandard(hdInspectionStandard);
    }

    /**
     * 修改检查标准
     *
     * @param hdInspectionStandard 检查标准
     * @return 结果
     */
    @Override
    public int updateHdInspectionStandard(HdInspectionStandard hdInspectionStandard)
    {
        return hdInspectionStandardMapper.updateHdInspectionStandard(hdInspectionStandard);
    }

    /**
     * 批量删除检查标准
     *
     * @param ids 需要删除的检查标准主键
     * @return 结果
     */
    @Override
    public int deleteHdInspectionStandardByIds(Long[] ids)
    {
        return hdInspectionStandardMapper.deleteHdInspectionStandardByIds(ids);
    }

    /**
     * 删除检查标准信息
     *
     * @param id 检查标准主键
     * @return 结果
     */
    @Override
    public int deleteHdInspectionStandardById(Long id)
    {
        return hdInspectionStandardMapper.deleteHdInspectionStandardById(id);
    }

    @Override
    public List<HdInspectionStandard> getInfoByCondition(HdInspectionStandardVo vo) {
        String name = vo.getName();
        String type = vo.getType();
        String level = vo.getLevel();
        return hdInspectionStandardMapper.getInfoByCondition(name,type,level);
    }


}
